package com.liner;

public class ForDemo {
    public static void main(String[] args) {
        int sum = 0;
        for (int i = 1; i <= 100; i++) {
            sum += i;
        }
        System.out.println("sum = " + sum);
        System.out.println("-------------------");

        for (int i = 1; i <= 9; i++) {
            System.out.println(i + " * 9 = " + i * 9);
        }
        System.out.println("~~~~~~~~~~~");
        for (int i = 9; i >= 1; i--) {
            System.out.println(i + " * 9 = " + i * 9);
        }
        System.out.println("~~~~~~~~~~~");
        for (int i = 1; i <= 9; i += 2) {
            System.out.println(i + " * 9 = " + i * 9);
        }

        for (int i = 1; i <= 10; i++) {
            System.out.println("第" + i + "遍:行动是成功的阶梯");
        }


    }
}
